<?php

class Permission {

    public $_listKeyAccessKey;
    public $_group;
    public $_groupAccess;

    public function filterPrint($key, $return) {
        if ((!empty($this->_listKeyAccessKey) AND in_array($key, $this->_listKeyAccessKey)) OR (!empty($this->_group) AND !empty($this->_groupAccess) AND in_array($this->_groupAccess, $this->_group))) {
            print $return;
        }
    }

}